//
//  ViewController.m
//  10509
//
//  Created by student on 16/2/19.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)rectareacal:(UIButton *)sender
{
    int length = [self.length.text intValue];
    int width = [self.width.text intValue];
    self.recrarea.text = [NSString stringWithFormat:@"%d",length*width];
}

- (IBAction)circleareacal:(UIButton *)sender
{
    int radius = [self.radius.text intValue];
    self.circlearea.text = [NSString stringWithFormat:@"%f",radius*radius*M_PI];
}



- (IBAction)backtap:(UIControl *)sender
{
    [self.view endEditing:YES];
}
@end
